home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Vk / VkApp.z / VkApp
Encoding:
Text File  |  2001-04-17  |  58.7 KB  |  1,387 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkApp - Class used by all ViewKit applications to handle initialization
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkComponent : VkCallbackObject
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkApp.h>
  16.  
  17. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  18.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  19.           VkApp(char       *appClassName,
  20.                 int              *arg_c,
  21.                 char            **arg_v,
  22.                 XrmOptionDescRec *optionList       = NULL,
  23.                 int               sizeOfOptionList = 0 )
  24.  
  25.           VkApp(char       *appClassName,
  26.                 int              *arg_c,
  27.                 char            **arg_v,
  28.                 ArgList           argList,
  29.                 Cardinal          argCount,
  30.                 void            (*preRealizeFunction)(Widget w),
  31.                 XrmOptionDescRec *optionList,
  32.                 int               sizeOfOptionList)
  33.  
  34.  
  35.    VVVVeeeerrrrssssiiiioooonnnn IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  36.                static const int ViewKitMajorRelease
  37.                static const int ViewKitMinorRelease
  38.                static const char ViewKitReleaseString[]
  39.                void   setVersionString(const char *str)
  40.                const char  *versionString()
  41.                void setAboutDialog(VkDialogManager *aboutDialog)
  42.                void setStartupDialog(VkDialogManager *startupDialog)
  43.  
  44.  
  45.    RRRRuuuunnnnttttiiiimmmmeeee IIIInnnntttteeeerrrraaaaccccttttiiiioooonnnn
  46.               virtual void run()
  47.               void run(Boolean(*appEventHandler)(XEvent &))
  48.               void runOneEvent(Boolean(*appEventHandler)(XEvent &) = NULL)
  49.               void run_first()
  50.               virtual void handlePendingEvents()
  51.               void handlePendingEvents(Boolean(*appEventHandler)(XEvent &))
  52.               XtInputMask handleOnePendingEvent(Boolean(*appEventHandler)(XEvent &) = NULL)
  53.               virtual void handleRawEvent(XEvent *event)
  54.               virtual void quitYourself()
  55.               virtual void terminate(int status = 0)
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  71.  
  72.  
  73.  
  74.    OOOOppppeeeerrrraaaattttiiiioooonnnnssss oooonnnn AAAApppppppplllliiiiccccaaaattttiiiioooonnnn WWWWiiiinnnnddddoooowwwwssss
  75.               void setMainWindow(VkSimpleWindow *win)
  76.               virtual void raise()
  77.               virtual void lower()
  78.               virtual void iconify()
  79.               virtual void open()
  80.               virtual void show()
  81.               virtual void hide()
  82.               void   startupIconified(Boolean flag)
  83.  
  84.  
  85.    AAAApppppppplllliiiiccccaaaattttiiiioooonnnn CCCCuuuurrrrssssoooorrrr CCCCoooonnnnttttrrrroooollll
  86.               virtual Cursor  busyCursor()
  87.               virtual Cursor  normalCursor()
  88.               void    setNormalCursor(Cursor c)
  89.               void    setBusyCursor(Cursor c)
  90.               void    setBusyCursor(VkCursorList *cl)
  91.               void    showCursor(Cursor c)
  92.  
  93.  
  94.    SSSSuuuuppppppppoooorrrrtttt ffffoooorrrr BBBBuuuussssyyyy SSSSttttaaaatttteeeessss
  95.              virtual void  busy(const char *msg = NULL,
  96.                                 VkSimpleWindow *parent = NULL)
  97.              virtual void  veryBusy(const char *msg = NULL,
  98.                                     VkSimpleWindow *parent = NULL)
  99.              virtual void  notBusy()
  100.              void  setBusyDialog(VkBusyDialog *d)
  101.              virtual void progressing(const char *msg = NULL);
  102.  
  103.  
  104.    CCCCoooonnnnvvvveeeennnniiiieeeennnntttt AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
  105.               XtAppContext        appContext() const
  106.               char                *name() const
  107.               Display            *display() const
  108.               char              **argv() const
  109.               char               *argv(int index) const
  110.               int                 argc() const
  111.               char               *applicationClassName() const
  112.               VkSimpleWindow     *mainWindow() const
  113.               void                setFallbacks(char **fallbacks)
  114.               char               *shellGeometry() const
  115.               Boolean             startupIconified() const
  116.               virtual const char *className() const
  117.               VkApp              *theApplication
  118.  
  119.  
  120.    VVVViiiissssuuuuaaaallll CCCCoooonnnnttttrrrroooollll
  121.                static void useOverlayApps(const Boolean flag)
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  137.  
  138.  
  139.  
  140.    HHHHeeeellllpppp ssssyyyysssstttteeeemmmm
  141.               int helpInit(char *client, char *sep);
  142.               int helpMsg(char *key, char *book, char *userData);
  143.               int helpIndexMsg(char *key, char *book);
  144.               static const char *const helpInitCallback;
  145.               static const char *const helpMsgCallback;
  146.               static const char *const helpIndexMsgCallback;
  147.               void useSGIHelp();
  148.               static void sgiHelpInit(VkCallbackObject* caller,
  149.                                       void* clientData,
  150.                                       void* callData);
  151.               static void sgiHelpMsg(VkCallbackObject* caller,
  152.                                      void* clientData,
  153.                                      void* callData);
  154.               static void sgiHelpIndexMsg(VkCallbackObject* caller,
  155.                                           void* clientData,
  156.                                           void* callData);
  157.  
  158.  
  159.  
  160. PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  161.               int parseCommandLine(XrmOptionDescRec *opt,
  162.                                    Cardinal numOptions)
  163.               VkComponentList _winList
  164.               virtual void afterRealizeHook()
  165.  
  166.  
  167.  
  168.  
  169. CCCCOOOOMMMMMMMMAAAANNNNDDDD LLLLIIIINNNNEEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD WWWWIIIITTTTHHHH TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  170.      -_s_c_h_e_m_e
  171.           Sets the scheme for the application's resources.
  172.  
  173.      -_u_s_e_O_v_e_r_l_a_y_A_p_p_s
  174.           If true, this resource causes the entire application to use the
  175.           deepest available overlay planes.
  176.  
  177.      -_u_s_e_O_v_e_r_l_a_y_D_i_a_l_o_g_s
  178.           If true, this resource causes all dialogs to use the deepest
  179.           available overlay planes.
  180.  
  181.      -_u_s_e_O_v_e_r_l_a_y_M_e_n_u_s
  182.           If true, this resource causes all menus to use the deepest available
  183.           overlay planes.
  184.  
  185.  
  186.  
  187. XXXX RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD WWWWIIIITTTTHHHH TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  188.      _b_u_s_y_C_u_r_s_o_r_F_o_r_e_g_r_o_u_n_d
  189.           The foreground color used by the busy cursor.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  203.  
  204.  
  205.  
  206.      _b_u_s_y_C_u_r_s_o_r_B_a_c_k_g_r_o_u_n_d
  207.           The background color used by the busy cursor.
  208.  
  209.      _i_c_o_n_i_c
  210.           If true, this resource causes the entire application to startup
  211.           iconified.
  212.  
  213.      _n_o_r_m_a_l_C_u_r_s_o_r_F_o_r_e_g_r_o_u_n_d
  214.           The foreground color used by the normal cursor.
  215.  
  216.      _n_o_r_m_a_l_C_u_r_s_o_r_B_a_c_k_g_r_o_u_n_d
  217.           The background color used by the normal cursor.
  218.  
  219.      _s_i_l_e_n_c_e_W_a_r_n_i_n_g_s
  220.           If True, an application will install error and warning handlers that
  221.           effectively hide all Xt warnings.  Some of these messages are
  222.           unavoidable, and this resource can be set before a product is
  223.           shipped.
  224.  
  225.      _u_s_e_O_v_e_r_l_a_y_A_p_p_s
  226.           This is equivalent to the command-line switch -_u_s_e_O_v_e_r_l_a_y_A_p_p_s.
  227.  
  228.      _u_s_e_O_v_e_r_l_a_y_D_i_a_l_o_g_s
  229.           This is equivalent to the command-line switch -_u_s_e_O_v_e_r_l_a_y_D_i_a_l_o_g_s.
  230.  
  231.      _u_s_e_O_v_e_r_l_a_y_M_e_n_u_s
  232.           This is equivalent to the command-line switch -_u_s_e_O_v_e_r_l_a_y_M_e_n_u_s.
  233.  
  234.  
  235.  
  236. XXXX DDDDEEEEBBBBUUUUGGGGGGGGIIIINNNNGGGG RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD WWWWIIIITTTTHHHH TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  237.      There are some resources that are only available in the debugging
  238.      versions of the library.  Non-debugging versions of the library simply
  239.      ignore them.
  240.  
  241.      _d_e_b_u_g_R_e_s_o_u_r_c_e_s
  242.           If this resource is set to true, the application will save the
  243.           contents of its resource database to /usr/tmp/resources.db.
  244.  
  245.      _d_e_b_u_g_X_t_M_o_d_e
  246.           If true, the application will core dump when any X or Xt warning or
  247.           error occurs.
  248.  
  249.      _p_r_i_n_t_E_v_e_n_t
  250.           if non-zero, ViewKit will print information about each event to
  251.           stderr.  Currently (6/96) the name of each event, the name of the
  252.           widget that got the event, and the widget's classname are printed.
  253.  
  254. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  255.      VkApp provides various central facilities required by all ViewKit
  256.      applications. All applications must create a single instance of VkApp or
  257.      a derived class.
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  269.  
  270.  
  271.  
  272.      The following constructor is the normal one.  Most applications will have
  273.      no reason to use any other.
  274.  
  275.               VkApp(char             *appClassName,
  276.                     int              *arg_c,
  277.                     char            **arg_v,
  278.                     XrmOptionDescRec *optionList       = NULL,
  279.                     int               sizeOfOptionList = 0);
  280.  
  281.  
  282.      The following constructor is rarely needed.  It is used when an
  283.      application must set creation-time resources on the invisible top-level
  284.      shell widget that VkApp creates.
  285.  
  286.      One use of it is for an application that runs entirely in a non-default
  287.      visual, and also has Motif drag and drop enabled.  Such an application
  288.      should use this constructor to set the visual attributes for the shell
  289.      that the VkApp constructor creates, so that they match those used for the
  290.      rest of the application.  Setting the visual attributes this way allows
  291.      the application to have all of its shells in a single non-default visual.
  292.  
  293.      (As of 6/96, if an application does not ensure that its visuals match,
  294.      Motif drag and drop will core dump.  There are non-obvious work-arounds,
  295.      and a genuine multi-visual application must still use them.)
  296.  
  297.               VkApp(char             *appClassName,
  298.                     int              *arg_c,
  299.                     char            **arg_v,
  300.                     ArgList           argList,
  301.                     Cardinal          argCount,
  302.                     void            (*preRealizeFunction)(Widget w),
  303.                     XrmOptionDescRec *optionList,
  304.                     int               sizeOfOptionList);
  305.  
  306.  
  307.      Upon instantiation, VkApp calls various Xt functions to connect to the X
  308.      server and initialize the Xt Intrinsics.  ViewKit applications should _n_o_t
  309.      call _X_t_A_p_p_I_n_i_t_i_a_l_i_z_e() or other similar Xt initialization functions
  310.      directly.  VkApp uses the application-context style Xt functions
  311.      throughout, and wherever applicable, ViewKit applications must use the
  312.      app-context versions of all Xt functions.
  313.  
  314.      The simplest use of the VkApp class is to create an instance, create
  315.      other windows as needed (see VkSimpleWindow), and call _V_k_A_p_p::_r_u_n(), as
  316.      seen in the following example program.
  317.  
  318.  
  319.            #include <Vk/VkApp.h>
  320.            #include <Vk/VkSimpleWindow.h>
  321.  
  322.            void main ( int argc, char **argv )
  323.            {
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  335.  
  336.  
  337.  
  338.               VkApp    *app = new VkApp("Application",
  339.                                          &argc, argv);
  340.               VkSimpleWindow  *win = new VkSimpleWindow("window");
  341.  
  342.               win->show();
  343.               app->run();
  344.            }
  345.  
  346.  
  347.      An application's instance of VkApp can be referenced as _t_h_e_A_p_p_l_i_c_a_t_i_o_n
  348.      throughout an application, in any file that includes VkApp.h. This allows
  349.      easy use of various VkApp facilities, such as the _b_u_s_y() facility, and
  350.      easy access to the X Display pointer, the Xt application context, and so
  351.      on.
  352.  
  353.    DDDDeeeerrrriiiivvvviiiinnnngggg SSSSuuuubbbbccccllllaaaasssssssseeeessss
  354.      It is often useful to create subclasses of VkApp to support additional
  355.      application-wide services. One typical use of a derived class is to parse
  356.      additional command-line arguments. For example, the following simple
  357.      example specifies a -_v_e_r_b_o_s_e command-line argument, using an
  358.      _X_r_m_O_p_t_i_o_n_D_e_s_c_R_e_c. This array is passed to the protected member function
  359.      _p_a_r_s_e_C_o_m_m_a_n_d_L_i_n_e() to extract the flag, if it exists. The value of all
  360.      recovered options are placed in the application's resource database,
  361.      where they can be retrieved as needed.  Notice that _p_a_r_s_e_C_o_m_m_a_n_d_L_i_n_e()
  362.      returns an updated value of argc which _m_u_s_t be used to update the value
  363.      of argc as passed in by the calling application.  Failure to do so will
  364.      cause problems for applications that reference this value after
  365.      instantiating a VkApp object. (Applications can avoid any difficulties by
  366.      not referencing args directly, and using _t_h_e_A_p_p_l_i_c_a_t_i_o_n->_a_r_g_c() instead.)
  367.  
  368.  
  369.            #include <Vk/VkApp.h>
  370.  
  371.            class App : public VkApp {
  372.  
  373.             private:
  374.  
  375.               // Declare a description of the command line options
  376.  
  377.               static XrmOptionDescRec _cmdLineOptions[];
  378.  
  379.             public:
  380.  
  381.               App(char             *appClassName,
  382.                   int              *arg_c,
  383.                   char            **arg_v,
  384.                   XrmOptionDescRec *optionList       = NULL,
  385.                   int               sizeOfOptionList = 0);
  386.            };
  387.  
  388.            // Describe the command line options
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  401.  
  402.  
  403.  
  404.            XrmOptionDescRec App::_cmdLineOptions[] =
  405.            {
  406.               {
  407.               "-verbose", "*verbose", XrmoptionNoArg, "TRUE",
  408.               },
  409.            };
  410.  
  411.            // Constructor
  412.  
  413.            App::MyApp(char             *appClassName,
  414.                      int              *arg_c,
  415.                      char            **arg_v,
  416.                      XrmOptionDescRec *optionList,
  417.                      int               sizeOfOptionList) :
  418.               VkApp(appClassName,
  419.                     arg_c,
  420.                     arg_v,
  421.                     optionList,
  422.                     sizeOfOptionList)
  423.            {
  424.               // Parse the command line
  425.  
  426.               *arg_c = parseCommandLine(_cmdLineOptions,
  427.                                         XtNumber(_cmdLineOptions));
  428.            }
  429.  
  430.  
  431.      Derived classes may also need access to the windows currently used in an
  432.      application. The _winList member provides access to a list of windows, in
  433.      the form of a VkComponentList object (see VkComponentList(3x)).
  434.  
  435.  
  436. VVVVIIIIEEEEWWWWKKKKIIIITTTT VVVVEEEERRRRSSSSIIIIOOOONNNNSSSS
  437.      The ViewKit supports several constants that can be used to identify the
  438.      current ViewKit release. These are:
  439.  
  440.    VVVViiiieeeewwwwKKKKiiiittttMMMMaaaajjjjoooorrrrRRRReeeelllleeeeaaaasssseeee;;;;
  441.                static const int ViewKitMajorRelease;
  442.  
  443.  
  444.           This integer value identifies the major release of the ViewKit. For
  445.           example, in a 1.2 release, this value would be "1". Should it prove
  446.           necessary to use conditional statements in your code to handle
  447.           different versions of the library, this value can be useful.
  448.  
  449.    VVVViiiieeeewwwwKKKKiiiittttMMMMiiiinnnnoooorrrrRRRReeeelllleeeeaaaasssseeee;;;;
  450.                static const int ViewKitMinorRelease;
  451.  
  452.  
  453.           This integer value identifies the current minor release of the
  454.           ViewKit. For example, in a 1.2 release, this value would be "2".
  455.           Should it prove necessary to use conditional statements in your code
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  467.  
  468.  
  469.  
  470.           to handle different versions of the library, this value can be
  471.           useful.
  472.  
  473.    VVVViiiieeeewwwwKKKKiiiittttRRRReeeelllleeeeaaaasssseeeeSSSSttttrrrriiiinnnngggg
  474.                static const char ViewKitReleaseString[];
  475.  
  476.  
  477.           This string contains the complete major and minor release
  478.           information on the ViewKit. You can identify the version of the
  479.           ViewKit an application is compiled with by running:
  480.  
  481.           strings program | grep "ViewKit Release"
  482.  
  483.  
  484. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  485.    VVVVkkkkAAAApppppppp(((())))
  486.           VkApp(char             *appClassName,
  487.                int              *arg_c,
  488.                char            **arg_v,
  489.                XrmOptionDescRec *optionList       = NULL,
  490.                int               sizeOfOptionList = 0)
  491.  
  492.  
  493.           The VkApp constructor initializes the Xt Intrinsics by calling
  494.           _X_t_T_o_o_l_k_i_t_I_n_i_t_i_a_l_i_z_e(), _X_t_C_r_e_a_t_e_A_p_p_l_i_c_a_t_i_o_n_C_o_n_t_e_x_t() and
  495.           _X_t_O_p_e_n_D_i_s_p_l_a_y().  The constructor also creates a shell to serve as a
  496.           parent for all other main windows. The ViewKit supports the multi-
  497.           shell architecture described in the book "X Window System Toolkit",
  498.           Asente and Swick, 1990. All other windows are created as popup
  499.           children of the shell created by VkApp, which is never visible. The
  500.           VkApp constructor also installs various error handlers and retrieves
  501.           the application resources recognized by VkApp.
  502.  
  503.           The first argument indicates the class name of the application,
  504.           which is used to load application resources. The second and third
  505.           arguments must be a pointer to argc and the application's argv
  506.           array. These arguments are passed to _X_t_O_p_e_n_D_i_s_p_l_a_y() and the
  507.           recognized arguments are removed.
  508.  
  509.      The following constructor is rarely needed.  It is only used when an
  510.      application must set creation-time resources on the invisible top-level
  511.      shell widget that VkApp creates.  This constructor operates just like the
  512.      (shorter) more common one (above), except that it provides control over
  513.      the resources used when the application's top level shell is created.
  514.      The motivation for this is that without it you cannot have a single-
  515.      visual application that was not in the default visual.
  516.  
  517.           VkApp(char             *appClassName,
  518.                 int              *arg_c,
  519.                 char            **arg_v,
  520.                 ArgList           argList,
  521.                 Cardinal          argCount,
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  533.  
  534.  
  535.  
  536.                 void            (*preRealizeFunction)(Widget w),
  537.                 XrmOptionDescRec *optionList,
  538.                 int               sizeOfOptionList);
  539.  
  540.  
  541.           One use of this constructor is for an application that runs entirely
  542.           in a non-default visual, and also has Motif drag and drop enabled.
  543.           Such an application should use this constructor to set the visual
  544.           attributes for the shell that the VkApp constructor creates, so that
  545.           they match those used for the rest of the application.  Setting the
  546.           visual attributes this way allows the application to have all of its
  547.           shells in a single non-default visual.  (As of 6/96, if an
  548.           application does not ensure that its visuals match, Motif drag and
  549.           drop will core dump.  There are non-obvious work-arounds, and a
  550.           genuine multi-visual application must still use them.)
  551.  
  552.      +o    Any resource that can be passed on the _a_r_g_L_i_s_t, such as default font
  553.           list, should be passed in that way.
  554.  
  555.      +o    Visual information cannot be known until after the display is
  556.           opened, and so cannot be passed in on the _a_r_g_L_i_s_t.
  557.  
  558.      +o    _p_r_e_R_e_a_l_i_z_e_F_u_n_c_t_i_o_n(_w) will be called with the baseWidget (i.e the
  559.           shell).  It will be called after widget creation, but before the
  560.           widget is realized.  At that time, the application can find the
  561.           visual information it needs, and do an _X_t_S_e_t_V_a_l_u_e_s() call.  The
  562.           manual not withstanding, since the widget has not yet been realized,
  563.           this is OK - provided that the call sets _a_l_l _v_i_s_u_a_l _r_e_s_o_u_r_c_e_s
  564.           consistently.
  565.  
  566.    sssseeeettttAAAAbbbboooouuuuttttDDDDiiiiaaaalllloooogggg
  567.                void setAboutDialog(VkDialogManager *dialog);
  568.  
  569.  
  570.           This function allows applications to replace the dialog displayed
  571.           when the user asks for help on "Product Info". The default behavior
  572.           of this help item is to display a VkInformationDialog that reports
  573.           the name and version information for this application (See
  574.           setVersionInfo, and VkInformationDialog). Applications that wish to
  575.           customize the dialog that appears in this case can install any
  576.           subclass of VkDialogManager using this function. The new dialog will
  577.           be posted with a string that identifies the name of the application
  578.           and the version, but otherwise the content of the dialog is up to
  579.           the application. (See VkDialogManager and VkGenericDialog for more
  580.           information on dialogs.)
  581.  
  582.      +o    The string "Application Name:" in the default popup dialog can be
  583.           localized by adding a resource, vkAppNameL10NString, with a
  584.           translated string to the application's app-defaults file.  For
  585.           example;
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  599.  
  600.  
  601.  
  602.                *vkAppNameL10NString: Application Name:
  603.  
  604.  
  605.    sssseeeettttVVVVeeeerrrrssssiiiioooonnnnSSSSttttrrrriiiinnnngggg
  606.                void setVersionString(const char *str);
  607.  
  608.  
  609.           This function specifies a string to be used as the version of an
  610.           application based on the ViewKit. This string appears by default in
  611.           the "Product Info" dialog.
  612.  
  613.    vvvveeeerrrrssssiiiioooonnnnSSSSttttrrrriiiinnnngggg
  614.               const char *versionString();
  615.  
  616.  
  617.           This function retrieves the currently installed version string.
  618.  
  619.    rrrruuuunnnn
  620.               virtual void run();
  621.  
  622.  
  623.           This function should be called instead of _X_t_A_p_p_M_a_i_n_L_o_o_p() in ViewKit
  624.           programs.  _r_u_n() calls _r_u_n__f_i_r_s_t() to do some internal
  625.           initialization, and then enters a custom main loop that dispatches
  626.           application events, raw X events, and normal Xt events.  (see
  627.           _h_a_n_d_l_e_R_a_w_E_v_e_n_t().)
  628.  
  629.               void run(Boolean(*appEventHandler)(XEvent &))
  630.  
  631.  
  632.           This is the easiest way to customize ViewKit's X event loop.  This
  633.           entry allows an application to customize the event loop without
  634.           taking responsibility for the entire event loop.  For each event,
  635.           the application can either supplement or replace the main event loop
  636.           handling.
  637.  
  638.           Each time through the event loop, before doing any event processing
  639.           of its own, _r_u_n() calls _a_p_p_E_v_e_n_t_H_a_n_d_l_e_r() with the event.  If
  640.           _a_p_p_E_v_e_n_t_H_a_n_d_l_e_r() has completely handled the event, it returns TRUE
  641.           and no further handling of that event occurs.  If ViewKit handling
  642.           of that event is still needed, then _a_p_p_E_v_e_n_t_H_a_n_d_l_e_r() must return
  643.           FALSE.
  644.  
  645.               void run_first()
  646.  
  647.  
  648.           _r_u_n__f_i_r_s_t() is called by _r_u_n().  Any application that overrides
  649.           _r_u_n() must ensure that _r_u_n__f_i_r_s_t() gets called.  See OOOOvvvveeeerrrrrrrriiiiddddiiiinnnngggg
  650.           VVVVkkkkAAAApppppppp::::::::rrrruuuunnnn(((()))), below, for more information.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  665.  
  666.  
  667.  
  668.               void runOneEvent(Boolean(*appEventHandler)(XEvent &) = NULL)
  669.  
  670.  
  671.           _r_u_n_O_n_e_E_v_e_n_t() is the event handling function called by _r_u_n().  It
  672.           does whatever things ViewKit needs beyond the standard Xt event
  673.           handling.  Any application that overrides _r_u_n() must ensure that
  674.           some ViewKit event handling function gets called.  See OOOOvvvveeeerrrrrrrriiiiddddiiiinnnngggg
  675.           VVVVkkkkAAAApppppppp::::::::rrrruuuunnnn(((()))), below, for more information.
  676.  
  677.  
  678.    hhhhaaaannnnddddlllleeeePPPPeeeennnnddddiiiinnnnggggEEEEvvvveeeennnnttttssss
  679.               virtual void handlePendingEvents();
  680.  
  681.  
  682.           _h_a_n_d_l_e_P_e_n_d_i_n_g_E_v_e_n_t_s() retrieves and dispatches all X11 events,
  683.           timers, and alternate input.  It does not block -- it returns when
  684.           there is nothing pending.  It does not call any workproc's.
  685.  
  686.               void VkApp::handlePendingEvents(Boolean(*appEventHandler)(XEvent &))
  687.  
  688.  
  689.           This version is exactly the same as _h_a_n_d_l_e_P_e_n_d_i_n_g_E_v_e_n_t_s(), above,
  690.           except that it allows an application's event handler to also see
  691.           each event.  See _r_u_n_O_n_e_E_v_e_n_t(_B_o_o_l_e_a_n(*_a_p_p_E_v_e_n_t_H_a_n_d_l_e_r)(_X_E_v_e_n_t &) =
  692.           _N_U_L_L), above, for more information.
  693.  
  694.               XtInputMask VkApp::handleOnePendingEvent(
  695.                          Boolean(*appEventHandler)(XEvent &) = NULL)
  696.  
  697.  
  698.           _h_a_n_d_l_e_O_n_e_P_e_n_d_i_n_g_E_v_e_n_t() returns after handling a single event, or
  699.           immediately if there are no events.  The return value is the mask
  700.           returned by _X_t_A_p_p_P_e_n_d_i_n_g(), which will be zero if there are no
  701.           pending events.  The purpose of this routine is to permit
  702.           construction of non-blocking event loops that do something before
  703.           (and/or after) each event.
  704.  
  705.  
  706.    OOOOvvvveeeerrrrrrrriiiiddddiiiinnnngggg VVVVkkkkAAAApppppppp::::::::rrrruuuunnnn(((())))
  707.           _r_u_n() consists of:
  708.  
  709.                void VkApp::run()
  710.                {
  711.                     run_first();
  712.                     while (True)
  713.                     {
  714.                          runOneEvent((Boolean(*)(XEvent &)) NULL);
  715.                     }
  716.                }
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  731.  
  732.  
  733.  
  734.           In most cases, an application does not need to override _V_k_A_p_p::_r_u_n()
  735.           to control events.  Instead, the application can do such things as:
  736.           use standard X mechanisms to add event handlers; use one or more
  737.           workproc's; maintain its own queue of all that it needs to do, and
  738.           then dispatch that work in a single workproc;
  739.  
  740.           If the above are not sufficient, the next thing to look into is
  741.           calling _r_u_n(_B_o_o_l_e_a_n(*_a_p_p_E_v_e_n_t_H_a_n_d_l_e_r)(_X_E_v_e_n_t &)).
  742.  
  743.           If an application really does need to override _r_u_n(), though, then
  744.           the application must call _r_u_n__f_i_r_s_t() before the first event
  745.           processing is done, and it must call one of the ViewKit event
  746.           processing routines from the application's event loop.  If it does
  747.           not do those two things, it may not be compatible with a future
  748.           release of ViewKit.
  749.  
  750.           An application can override _V_k_A_p_p::_r_u_n() to add application code
  751.           that will be executed each time through the event loop.
  752.           _r_u_n_O_n_e_E_v_e_n_t() will only return if there was an X11 event.  Otherwise
  753.           it will service any workproc's, and then block waiting for the next
  754.           X11 event.  Such an overridden event loop might look like the
  755.           following:
  756.  
  757.                MyApp::run()
  758.                {
  759.                     run_first();
  760.                     for (;;) {
  761.                          <application code here>
  762.                          runOneEvent();
  763.                          <application code here>
  764.                     }
  765.                }
  766.  
  767.  
  768.           If the application does not want to block in ViewKit when there are
  769.           no X11 events, it can use the following event loop.  Note that since
  770.           _h_a_n_d_l_e_P_e_n_d_i_n_g_E_v_e_n_t_s() neither blocks nor calls any workproc's, the
  771.           application must take care of both of those things.
  772.  
  773.                MyApp::run()
  774.                {
  775.                     XEvent event;
  776.                     run_first();
  777.                     for (;;) {
  778.                          <application code, if any here>
  779.                          handlePendingEvents();
  780.                          <application code to handle any workproc's here>
  781.                          // Block until there are more events
  782.                          XtAppPeekEvent( appContext(), &event);
  783.                     }
  784.                }
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  797.  
  798.  
  799.  
  800.           Alternatively, the loop could call _h_a_n_d_l_e_O_n_e_P_e_n_d_i_n_g_E_v_e_n_t() if it
  801.           needs to take control each time through the event loop.
  802.  
  803.               Demonstration program
  804.  
  805.  
  806.           For a demonstration program illustrating the several ways to
  807.           customize the event loop, see /_u_s_r/_s_h_a_r_e/_s_r_c/_V_i_e_w_K_i_t/_B_a_s_i_c/_r_u_n._c++.
  808.  
  809.  
  810.    qqqquuuuiiiittttYYYYoooouuuurrrrsssseeeellllffff;;;;
  811.               virtual void quitYourself();
  812.  
  813.  
  814.      Applications that wish to exit, but that wish to allow other parts of the
  815.      applications to abort the shutdown should call _q_u_i_t_Y_o_u_r_s_e_l_f().
  816.      _Q_u_i_t_Y_o_u_r_s_e_l_f() loops through each top level VkSimpleWindow (or subclass)
  817.      calling each window's _o_k_T_o_Q_u_i_t() method.  The windows are queried in the
  818.      reverse order in which they are created, except that the window
  819.      designated as the main window is checked last.  (See VkSimpleWindow for
  820.      more information.)  If any object's _o_k_T_o_Q_u_i_t() method returns FALSE, the
  821.      shutdown is terminated.
  822.  
  823.      If the resource _q_u_i_t_M_o_d_e is set to aaaallllllll, then no action is taken unless
  824.      all windows return TTTTRRRRUUUUEEEE.  If they do, then all windows are deleted and
  825.      the application is terminated.
  826.  
  827.      If the resource _q_u_i_t_M_o_d_e is not set to aaaallllllll, then any window that returns
  828.      TTTTRRRRUUUUEEEE is deleted and any window that returns FFFFAAAALLLLSSSSEEEE is not deleted.
  829.  
  830.  
  831.    tttteeeerrrrmmmmiiiinnnnaaaatttteeee
  832.               virtual void terminate(int status = 0);
  833.  
  834.  
  835.           _t_e_r_m_i_n_a_t_e() is called within the ViewKit when any fatal error
  836.           occurs.  Because _t_e_r_m_i_n_a_t_e() is a virtual function, it can be
  837.           overloaded by derived class that need to perform some cleanup before
  838.           exiting. Classes that override _t_e_r_m_i_n_a_t_e() should perform their
  839.           clean up and call their base class's _t_e_r_m_i_n_a_t_e() method. This
  840.           function is not meant for clean shutdowns, but is normally reserved
  841.           for situations in which the termination cannot be stopped.  You may
  842.           also want to consider using the UNIX _a_t_e_x_i_t() facility (See
  843.           atexit(3C)).  _T_e_r_m_i_n_a_t_e() is called automatically when all windows
  844.           have been deleted.  Also see _q_u_i_t_Y_o_u_r_s_e_l_f().
  845.  
  846.  
  847.    hhhhaaaannnnddddlllleeeeRRRRaaaawwwwEEEEvvvveeeennnntttt
  848.               virtual void handleRawEvent(XEvent *event);
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  863.  
  864.  
  865.  
  866.           Some events do not have a type and are not dispatched by the Xt
  867.           dispatch mechanism. These events include client messages and events
  868.           registered for non-widgets (for example, a PropertyNotify on the
  869.           root window). When such an event is received, VkApp calls the
  870.           virtual function _h_a_n_d_l_e_R_a_w_E_v_e_n_t() for event loops the VkApp instance
  871.           as well as for all VkSimpleWindow instances.
  872.  
  873.    sssseeeettttMMMMaaaaiiiinnnnWWWWiiiinnnnddddoooowwww
  874.               void setMainWindow(VkSimpleWindow *win);
  875.  
  876.  
  877.           Specify a subclass of VkSimpleWindow to be treated as the main
  878.           window of the application. This window is used by default for
  879.           centering dialogs that have not specified otherwise, and is also
  880.           treated differently when the application is being shut down. See
  881.           _q_u_i_t_Y_o_u_r_s_e_l_f().
  882.  
  883.     rrrraaaaiiiisssseeee
  884.               virtual void raise();
  885.  
  886.  
  887.           Raises all visible windows in the application.
  888.  
  889.    lllloooowwwweeeerrrr
  890.               virtual void lower();
  891.  
  892.  
  893.           Lowers all visible windows in the application.
  894.  
  895.  
  896.    iiiiccccoooonnnniiiiffffyyyy
  897.               virtual void iconify();
  898.  
  899.  
  900.           Iconifies all visible windows in the application.
  901.  
  902.    ooooppppeeeennnn
  903.               virtual void open();
  904.  
  905.  
  906.           Opens all iconified windows in the application.
  907.  
  908.    sssshhhhoooowwww
  909.               virtual void show();
  910.  
  911.  
  912.           Make all hidden, non-iconified windows visible.
  913.  
  914.    hhhhiiiiddddeeee
  915.               virtual void hide();
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  929.  
  930.  
  931.  
  932.           Remove all visible, non-iconified windows from the screen.
  933.  
  934.    ssssttttaaaarrrrttttuuuuppppIIIIccccoooonnnniiiiffffiiiieeeedddd
  935.               void   startupIconified(Boolean flag);
  936.  
  937.  
  938.           If called before an application enters the event loop (_r_u_n()), this
  939.           will cause the application to start in an iconified state.
  940.  
  941.    bbbbuuuussssyyyyCCCCuuuurrrrssssoooorrrr
  942.              virtual Cursor  busyCursor();
  943.  
  944.  
  945.           Returns the current busy cursor used by the application.
  946.  
  947.    nnnnoooorrrrmmmmaaaallllCCCCuuuurrrrssssoooorrrr
  948.               virtual Cursor  normalCursor();
  949.  
  950.  
  951.           Returns the current normal cursor used by the application.
  952.  
  953.    sssseeeettttNNNNoooorrrrmmmmaaaallllCCCCuuuurrrrssssoooorrrr
  954.               void    setNormalCursor(Cursor c);
  955.  
  956.  
  957.           Sets the normal cursor used by the application. If the application
  958.           is not busy, this cursor will be displayed in all windows. If the
  959.           application is busy, this cursor will become visible when the
  960.           application returns from its busy state.
  961.  
  962.    sssseeeettttBBBBuuuussssyyyyCCCCuuuurrrrssssoooorrrr
  963.               void setBusyCursor(Cursor c);
  964.               void setBusyCursor(VkCursorList *cl);
  965.  
  966.  
  967.           Sets the busy cursor used by the application. If the application is
  968.           busy, this cursor will be displayed in all windows immediately. If
  969.           the application is not busy, this cursor will become visible when
  970.           the application becomes busy. If a VkCursorList object is specified
  971.           as the busy cursor, the application can support an animated cursor.
  972.           The application will cycle through one cursor each time the
  973.           application calls progressing().
  974.  
  975.           By default, a initial VkCursorList is installed in all ViewKit
  976.           applications.
  977.  
  978.    sssshhhhoooowwwwCCCCuuuurrrrssssoooorrrr
  979.               void    showCursor(Cursor c);
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                                                        PPPPaaaaggggeeee 11115555
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  995.  
  996.  
  997.  
  998.           This function temporarily displays a cursor in all windows. The
  999.           cursor can be reset by calling this function with a NULL cursor
  1000.           argument. The cursor will also be reset if the program becomes busy
  1001.           or returns from a busy state. This function is intended for use only
  1002.           for briefly displaying a cursor. For more permanent cursors, use
  1003.           _s_e_t_N_o_r_m_a_l_C_u_r_s_o_r(), or _s_e_t_B_u_s_y_C_u_r_s_o_r().
  1004.  
  1005.    bbbbuuuussssyyyy
  1006.    vvvveeeerrrryyyyBBBBuuuussssyyyy
  1007.    nnnnoooottttBBBBuuuussssyyyy
  1008.              virtual void  busy(const char *msg = NULL,
  1009.                                 VkSimpleWindow *parent = NULL);
  1010.              virtual void  veryBusy(const char *msg = NULL,
  1011.                                      VkSimpleWindow *parent = NULL);
  1012.              virtual void notBusy();
  1013.  
  1014.  
  1015.           Applications that expect to be unable to process events for some
  1016.           length of time should call _b_u_s_y() when they enter the busy state and
  1017.           call _n_o_t_B_u_s_y() when the program is no longer busy. Calls can be
  1018.           nested, but there must be matching pairs of _b_u_s_y() and _n_o_t_B_u_s_y()
  1019.           calls.  If no arguments are given to _b_u_s_y(), the application simply
  1020.           displays a busy cursor. The application also blocks out all input,
  1021.           to prevent any type-ahead problems that might occur.  If an string
  1022.           is given as the first argument, a dialog is posted to display the
  1023.           string. The string is treated first as the name of a resource that
  1024.           indicates a message to be displayed. If no resource is found the
  1025.           string is used as the message itself. If a VkSimpleWindow (or
  1026.           subclass) is specified, the dialog will be posted over this window.
  1027.           (See VkBusyDialog and VkDialogManager for more details on dialog
  1028.           behavior).
  1029.  
  1030.           The _v_e_r_y_B_u_s_y() function is intended for use when the application
  1031.           expects to be busy for an extended period of time. In this release,
  1032.           _v_e_r_y_B_u_s_y() simply calls _b_u_s_y(). In future releases, _v_e_r_y_B_u_s_y() may
  1033.           take some more interesting or appropriate action.
  1034.  
  1035.           Calling _n_o_t_B_u_s_y() undoes the affect of the most recent call to
  1036.           _b_u_s_y(). If the number of _n_o_t_B_u_s_y() calls matches the number of
  1037.           _b_u_s_y() calls, the application restores the normal cursor, enables
  1038.           device input, and unposts any busy dialog currently being displayed.
  1039.  
  1040.    pppprrrrooooggggrrrreeeessssssssiiiinnnngggg
  1041.              void  progressing(char *msg = NULL);
  1042.  
  1043.  
  1044.           If an application is busy, and has a VkCursorList object installed,
  1045.           this member function causes the next cursor in the list to be
  1046.           displayed. This function should be called periodically while an
  1047.           application is busy. If an option string is provided, the string is
  1048.           displayed in a busy dialog.
  1049.  
  1050.  
  1051.  
  1052.  
  1053.                                                                        PPPPaaaaggggeeee 11116666
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  1061.  
  1062.  
  1063.  
  1064.    sssseeeettttBBBBuuuussssyyyyDDDDiiiiaaaalllloooogggg
  1065.              void  setBusyDialog(VkBusyDialog *d);
  1066.  
  1067.  
  1068.           By default, _b_u_s_y() displays a dialog using the VkBusyDialog class.
  1069.           (See VkBusyDialog(3X)). Applications that wish to alter this
  1070.           behavior can call _s_e_t_B_u_s_y_D_i_a_l_o_g() to display an alternate dialog.
  1071.           This dialog must be implemented using a subclass of VkDialogManager.
  1072.           Calling _s_e_t_B_u_s_y_D_i_a_l_o_g() with a NULL argument restores the default
  1073.           VkBusyDialog. (See also, VkInterruptDialog(3X)).  Applications
  1074.           should call _s_e_t_B_u_s_y_D_i_a_l_o_g() only when the application is not busy.
  1075.  
  1076.    aaaappppppppCCCCoooonnnntttteeeexxxxtttt
  1077.               XtAppContext        appContext() const;
  1078.  
  1079.  
  1080.           This access function returns the application context used by the
  1081.           application.
  1082.  
  1083.    nnnnaaaammmmeeee
  1084.               char               *name() const;
  1085.  
  1086.  
  1087.           This access function returns the base name by which the application
  1088.           was invoked.
  1089.  
  1090.    ddddiiiissssppppllllaaaayyyy
  1091.               Display            *display() const;
  1092.  
  1093.  
  1094.           Returns a pointer to the X Display structure associated with this
  1095.           application's connection to the X server.
  1096.  
  1097.    aaaarrrrggggvvvv(((())))
  1098.               char              **argv() const;
  1099.  
  1100.  
  1101.           Returns a pointer to the argv array supplied to this application,
  1102.           but with all recognized command line arguments removed.
  1103.  
  1104.    aaaarrrrggggvvvv
  1105.               char               *argv(int index) const;
  1106.  
  1107.  
  1108.           Returns a specific entry in the argv array.
  1109.  
  1110.    aaaarrrrggggcccc
  1111.               int                 argc() const;
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                                                        PPPPaaaaggggeeee 11117777
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  1127.  
  1128.  
  1129.  
  1130.           Returns the number of command line arguments remaining after all
  1131.           recognized arguments have been removed.
  1132.  
  1133.    aaaapppppppplllliiiiccccaaaattttiiiioooonnnnCCCCllllaaaassssssssNNNNaaaammmmeeee
  1134.               char               *applicationClassName() const;
  1135.  
  1136.  
  1137.           Returns the application class name.
  1138.  
  1139.    mmmmaaaaiiiinnnnWWWWiiiinnnnddddoooowwww
  1140.               VkSimpleWindow     *mainWindow() const;
  1141.  
  1142.  
  1143.           Returns a pointer to the VkSimpleWindow (or subclass) object
  1144.           installed as the application's main window.
  1145.  
  1146.    sssseeeettttFFFFaaaallllllllbbbbaaaacccckkkkssss
  1147.               static void         setFallbacks(char **fallbacks)
  1148.  
  1149.  
  1150.           Sets _f_a_l_l_b_a_c_k_s as the _s_p_e_c_i_f_i_c_a_t_i_o_n__l_i_s_t needed to call
  1151.           _X_t_A_p_p_S_e_t_F_a_l_l_b_a_c_k_R_e_s_o_u_r_c_e_s(_3_X).  _s_e_t_F_a_l_l_b_a_c_k_s() must be called before
  1152.           the application constructs its _V_k_A_p_p object, because the _V_k_A_p_p
  1153.           constructor does call _X_t_A_p_p_S_e_t_F_a_l_l_b_a_c_k_R_e_s_o_u_r_c_e_s(_3_X), passing it the
  1154.           _s_p_e_c_i_f_i_c_a_t_i_o_n__l_i_s_t.
  1155.  
  1156.    sssshhhheeeellllllllGGGGeeeeoooommmmeeeettttrrrryyyy
  1157.               char               *shellGeometry() const;
  1158.  
  1159.  
  1160.           Returns the geometry of the base shell of the application. Some
  1161.           windows may wish to use this size as their own.
  1162.  
  1163.    ssssttttaaaarrrrttttuuuuppppIIIIccccoooonnnniiiiffffiiiieeeedddd
  1164.               Boolean             startupIconified() const;
  1165.  
  1166.  
  1167.           Calling this function before _r_u_n() is entered will cause all
  1168.           application windows to start up as icons.
  1169.  
  1170.    ccccllllaaaassssssssNNNNaaaammmmeeee
  1171.               virtual const char *className() const;
  1172.  
  1173.  
  1174.           Returns the class name of the VkApp (or subclass) instance being
  1175.           used.
  1176.  
  1177.    ****tttthhhheeeeAAAApppppppplllliiiiccccaaaattttiiiioooonnnn
  1178.               VkApp              *theApplication;
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                                                        PPPPaaaaggggeeee 11118888
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  1193.  
  1194.  
  1195.  
  1196.           This pointer can be used to reference the single instance of VkApp
  1197.           (or subclass) that must exist in any ViewKit application.
  1198.  
  1199.  
  1200.    uuuusssseeeeOOOOvvvveeeerrrrllllaaaayyyyAAAAppppppppssss(((())))
  1201.            static void useOverlayApps(const Boolean flag)
  1202.  
  1203.  
  1204.           Effectively, _u_s_e_O_v_e_r_l_a_y_A_p_p_s(_T_R_U_E) defaults the entire application
  1205.           into the deepest available overlay planes.
  1206.  
  1207.           The normal default for the (unrealized) VkApp shell is the normal
  1208.           planes.  That sets the default for all of its descendants to be the
  1209.           normal planes also.  _u_s_e_O_v_e_r_l_a_y_A_p_p_s(_T_R_U_E) sets the VkApp shell in
  1210.           the deepest available overlay planes, thus resetting the default
  1211.           planes for the entire application.
  1212.  
  1213.    hhhheeeellllppppIIIInnnniiiitttt(((())))
  1214.    hhhheeeellllppppMMMMssssgggg(((())))
  1215.    hhhheeeellllppppIIIInnnnddddeeeexxxxMMMMssssgggg(((())))
  1216.    hhhheeeellllppppIIIInnnniiiittttCCCCaaaallllllllbbbbaaaacccckkkk
  1217.    hhhheeeellllppppMMMMssssggggCCCCaaaallllllllbbbbaaaacccckkkk
  1218.    hhhheeeellllppppIIIInnnnddddeeeexxxxMMMMssssggggCCCCaaaallllllllbbbbaaaacccckkkk
  1219.    uuuusssseeeeSSSSGGGGIIIIHHHHeeeellllpppp(((())))
  1220.    ssssggggiiiiHHHHeeeellllppppIIIInnnniiiitttt(((())))
  1221.    ssssggggiiiiHHHHeeeellllppppMMMMssssgggg(((())))
  1222.    ssssggggiiiiHHHHeeeellllppppIIIInnnnddddeeeexxxxMMMMssssgggg(((())))
  1223.               int helpInit(char *client, char *sep);
  1224.               int helpMsg(char *key, char *book, char *userData);
  1225.               int helpIndexMsg(char *key, char *book);
  1226.               static const char *const helpInitCallback;
  1227.               static const char *const helpMsgCallback;
  1228.               static const char *const helpIndexMsgCallback;
  1229.               void useSGIHelp();
  1230.               static void sgiHelpInit(VkCallbackObject* caller,
  1231.                                       void* clientData,
  1232.                                       void* callData);
  1233.               static void sgiHelpMsg(VkCallbackObject* caller,
  1234.                                      void* clientData,
  1235.                                      void* callData);
  1236.               static void sgiHelpIndexMsg(VkCallbackObject* caller,
  1237.                                           void* clientData,
  1238.                                           void* callData);
  1239.  
  1240.      Historically, the way to provide help from a ViewKit application has been
  1241.      to link the application with a library that implemented the C functions
  1242.      _S_G_I_H_e_l_p_I_n_i_t(), _S_G_I_H_e_l_p_M_s_g(), and _S_G_I_H_e_l_p_I_n_d_e_x_M_s_g().  ViewKit and the
  1243.      application would call these functions in response to users' requests for
  1244.      help.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                                                        PPPPaaaaggggeeee 11119999
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  1259.  
  1260.  
  1261.  
  1262.      Help can also be provided by adding callbacks to the _h_e_l_p_I_n_i_t_C_a_l_l_b_a_c_k,
  1263.      _h_e_l_p_M_s_g_C_a_l_l_b_a_c_k, and _h_e_l_p_I_n_d_e_x_M_s_g_C_a_l_l_b_a_c_k lists.  Instead of calling the
  1264.      _S_G_I_H_e_l_p*() functions, ViewKit and the application call the VkApp methods
  1265.      _h_e_l_p_I_n_i_t(), _h_e_l_p_M_s_g(), and _h_e_l_p_I_n_d_e_x_M_s_g().
  1266.  
  1267.      If there are no callbacks installed on the corresponding callback lists,
  1268.      the VkApp help methods call the corresponding _S_G_I_H_e_l_p*() methods so that
  1269.      old applications continue to work.  If callbacks are installed, the
  1270.      callbacks are called instead.
  1271.  
  1272.      An application that provides help using the _s_g_i_h_e_l_p program can call the
  1273.      VkApp method _u_s_e_S_G_I_H_e_l_p(), which will install _s_g_i_H_e_l_p_I_n_i_t() on the
  1274.      _h_e_l_p_I_n_i_t_C_a_l_l_b_a_c_k list, _s_g_i_H_e_l_p_M_s_g() on the _h_e_l_p_M_s_g_C_a_l_l_b_a_c_k list, and
  1275.      _s_g_i_H_e_l_p_I_n_d_e_x_M_s_g() on the _h_e_l_p_I_n_d_e_x_M_s_g_C_a_l_l_b_a_c_k list.
  1276.  
  1277.      _s_g_i_H_e_l_p_I_n_i_t(), _s_g_i_H_e_l_p_M_s_g(), and _s_g_i_H_e_l_p_I_n_d_e_x_M_s_gx() interact with the
  1278.      _s_g_i_h_e_l_p program to provide the same help that applications used to get by
  1279.      linking with -_l_h_e_l_p_m_s_g.
  1280.  
  1281.      An application wishing to provide its own help mechanism can add its own
  1282.      callbacks to the callback lists.  The _c_a_l_l_D_a_t_a arguments for the
  1283.      _h_e_l_p_I_n_i_t_C_a_l_l_b_a_c_k, _h_e_l_p_M_s_g_C_a_l_l_b_a_c_k, and _h_e_l_p_I_n_d_e_x_M_s_g_C_a_l_l_b_a_c_k lists are of
  1284.      type _V_k_A_p_p::_H_e_l_p_I_n_i_t_A_r_g_s*, _V_k_A_p_p::_H_e_l_p_M_s_g_A_r_g_s*, and
  1285.      _V_k_A_p_p::_H_e_l_p_I_n_d_e_x_M_s_g_A_r_g_s* respectively.  After installing these callbacks,
  1286.      _h_e_l_p_I_n_i_t() will need to be called.
  1287.  
  1288.  
  1289. PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  1290.    ppppaaaarrrrsssseeeeCCCCoooommmmmmmmaaaannnnddddLLLLiiiinnnneeee(((())))
  1291.               int parseCommandLine(XrmOptionDescRec *opt,
  1292.                                    Cardinal num);
  1293.  
  1294.  
  1295.           This function can be called by subclasses to extract arguments from
  1296.           the command line.
  1297.  
  1298.    ____wwwwiiiinnnnLLLLiiiisssstttt
  1299.               VkComponentList _winList;
  1300.  
  1301.  
  1302.           This member can be accessed by derived classes that need to
  1303.           manipulate the application's top-level windows. See
  1304.           VkComponentList(3X).
  1305.  
  1306.    aaaafffftttteeeerrrrRRRReeeeaaaalllliiiizzzzeeeeHHHHooooooookkkk(((())))
  1307.               virtual void afterRealizeHook();
  1308.  
  1309.  
  1310.           Some applications need to perform certain actions only after the
  1311.           application's windows have been realized. Examples might include
  1312.           installing a colormap, or setting up properties on the application's
  1313.           windows.
  1314.  
  1315.  
  1316.  
  1317.                                                                        PPPPaaaaggggeeee 22220000
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. VVVVkkkkAAAApppppppp((((3333xxxx))))                                                            VVVVkkkkAAAApppppppp((((3333xxxx))))
  1325.  
  1326.  
  1327.  
  1328. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  1329.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  1330.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  1331.           setDefaultResources(), getResources(), manage(), unmanage(),
  1332.           baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
  1333.  
  1334.  
  1335.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  1336.           callCallbacks(), addCallback(), removeCallback(),
  1337.           removeAllCallbacks()
  1338.  
  1339.  
  1340. KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
  1341.      VkMsgApp
  1342.  
  1343. CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  1344.      VkComponent, VkComponentList, VkDialogManager, VkSimpleWindow
  1345.  
  1346. KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  1347.      VkApp, VkBackground, VkDialogManager, VkDoubleBuffer, VkFatalErrorDialog,
  1348.      VkGraph, VkHelpPane, VkInterruptDialog, VkMenuBar, VkMsgFacility, VkNode,
  1349.      VkPeriodic, VkPipe, VkResizer, VkSimpleWindow
  1350.  
  1351. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  1352.      VkComponent, VkDialogManager, VkMsgApp, VkSimpleWindow, VkWindow,
  1353.      VkCursorList
  1354.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  1355.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  1356.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  1357.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                                                        PPPPaaaaggggeeee 22221111
  1384.  
  1385.  
  1386.  
  1387.